

import nw from "nw-lafjs";
import {ok} from "@/utils/responseUtil";

// @ts-ignore
export default async function (ctx: FunctionContext) {
  let category = await nw.db.findListByWhereJson({
    dbName:"category",
    whereJson:{deleted:0}
  })
  for (let i = 0; i < category.length; i++) {
    category[i].id = category[i]._id
  }
  return ok(category)
}
